import { mapActions, mapGetters } from 'vuex'

// 全局的渠道数据获取
const myMixin = {
    computed: {
        ...mapGetters([
            'getChannelList',
        ])
    },
    beforeMount() {
        if (!this.getChannelList.length) {
            this.GET_CHANNELLIST()
        }
    },
    methods: {
        ...mapActions(['GET_CHANNELLIST'])
    }
}

export default myMixin